Previous Thread
Next Thread
Print Thread
Rate Thread
#103561 03/01/2002 4:29 PM
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
How would I go about optimizing this:

https://www.ubbdev.com/db/uploads/pagination_621.txt

If you have time can you tell me the principals behind making the changes?


- Allen wavey
- What Drives You?
Sponsored Links
#103562 03/01/2002 5:20 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
I'm not sure what can be done to speed it up... the best thing to do is just tinker with it as much as you can, trying different ideas, etc...

Check out the Benchmark module:

http://www.perldoc.com/perl5.6.1/lib/Benchmark.html


UBB.classic: Love it or hate it, it was mine.
#103563 03/01/2002 5:24 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
CC - out of curiousity, if you know O() notation, have you ever found it usefull with perl?

#103564 03/01/2002 9:12 PM
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
It's hard to read due to the inconsistent indentation, but it looks like a lot of common expressions could be moved outside of the loops.

Also, according to Programming Perl (3rd Ed., chap 24), using join is more efficient than a series of string concatenations.

#103565 03/02/2002 11:24 AM
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
quote:
Originally posted by jordo:
CC - out of curiousity, if you know O() notation, have you ever found it usefull with perl?

O notation is essentially a way of representing execution times/speeds for an algorithm. An algorithm can be represented in any languague [in some more effectivly than others], thus it's completely independant of relating it to perl, C, Java, etc. In other words, it's always useful when you're dealing with algorithms

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
Sponsored Links
#103566 03/02/2002 5:36 PM
Joined: Aug 2000
Posts: 874
Moderator / Developer
Moderator / Developer
Offline
Joined: Aug 2000
Posts: 874
yeah i know i was just curious whether they use it when developing ubb or whether the use Benchmark modules more heavily. smile

#103567 03/04/2002 2:51 PM
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
We don't use it unless we're not getting acceptable performance...


UBB.classic: Love it or hate it, it was mine.
#103568 03/10/2002 7:33 AM
Joined: Dec 2001
Posts: 51
Member
Member
Offline
Joined: Dec 2001
Posts: 51
Split the variables earlier?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 462
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 12
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)